<template>
  <div class="recommend">
    <router-link tag="div" :to='"/detail/"+item.id' v-for="item of recommendList" :key="item.id" class="item">
      <img :src="item.imgUrl" alt>
      <div class="info">
        <h5>{{item.title}}</h5>
        <p>{{item.content}}</p>
        <button>查看详情</button>
      </div>
    </router-link>
  </div>
</template>
<script>
export default {
  name: "Recommend",
  props: {
    recommendList: {
      type: Array
    }
  }
};
</script>
<style lang="scss" scoped>
.item {
  display: flex;
  padding: 20px;
  border-bottom: 1px solid #eee;
  img {
    width: 110px;
    height: 110px;
  }
  .info {
    padding: 10px 20px;
    line-height: 30px;
    p {
      font-size: 14px;
      color: gray;
    }
    button{
        color: orange;
        border-radius: 10px;
        background: #fff;
        padding: 5px;
        border:1px solid #ccc;
    }
  }
}
</style>
